package com.example.dante.a17376060_wanghaikang_finaltest.cn.example.main.cn.example.broadcastReceiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.widget.Toast;

public class Receiver extends BroadcastReceiver {
    private static String username;
    private static Boolean whether;
    @Override
    public void onReceive(Context context, Intent intent) {
            username=intent.getStringExtra("user_name");
            whether=intent.getBooleanExtra("loginstatus",false);
        Toast.makeText(context,"广播发送了",Toast.LENGTH_LONG).show();
    }
    public String getUsername(){
        return username;
    }
    public Boolean getWhether(){
        return whether;
    }
}
